/**
 @Name：设置
 @Author：蓝博
*/

layui.define(function (exports) {
    layui.use(['carousel', 'table'], function () {
        var $ = layui.jquery,
            carousel = layui.carousel,
            table = layui.table,
            device = layui.device();

        //渲染轮播
        carousel.render({
            elem: '.layui-carousel',
            width: '100%',
            height: '60px',
            arrow: 'none',
            autoplay: true,
            trigger: device.ios || device.android ? 'click' : 'hover',
            anim: 'fade'
        });

        //渲染表格
        table.render({
            elem: '#consoleHotTb1',
            data: [
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" },
                { searchNum: "新年放假通知安排", userNum: "2019-12-12 00:00:00" }
            ],
            page: { limit: 14 },
            cols: [[
                { type: 'numbers', fixed: 'left' },
                { field: 'searchNum', title: '公告通知' },
                {
                    title: '发布人', width: 80, align: 'center',templet: function (d) {
                        return '<span class="layui-text"><a href="javascript:;">程一鸣</a></span>';
                    }
                },
                {
                    title: '部门',width: 150,  templet: function (d) {
                        return '人事部';
                    }
                },
                { field: 'userNum', title: '发布时间', width: 160, align: 'center' },
            ]]
        });
    });

    //对外输出接口
    exports('LAY_home_default', {})
});